﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 上课实验1
{
    public partial class s实验1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = "你选择的是" ;
        }

        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
        {
           
        }

        protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
        {
            switch (DropDownList2.SelectedValue)
            {
                case "天津":
                    DropDownList1.Items.Clear();
                    DropDownList1.Items.Add("津南区");
                    DropDownList1.Items.Add("北辰区");
                    DropDownList1.Items.Add("河西区");
                    break;
                case "北京":
                    DropDownList1.Items.Clear();
                    DropDownList1.Items.Add("延庆区");
                    DropDownList1.Items.Add("顺义区");
                    break;
            }
        }
    }
}